/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.business.router.test.base;


import cn.hutool.core.util.RandomUtil;
import info.peigen.hotpot.business.router.facade.order.payee.QueryPayeeCurrencyOrder;
import info.peigen.hotpot.business.router.facade.order.payee.ReceiptOrder;
import info.peigen.hotpot.business.router.facade.order.virtualaccount.ChangeVirtualAccountOrder;
import info.peigen.hotpot.business.router.facade.order.virtualaccount.CreateVirtualAccountOrder;
import info.peigen.hotpot.business.router.facade.order.withdraw.WithdrawOrder;
import info.peigen.hotpot.common.core.util.IdUtil;
import lombok.AccessLevel;
import lombok.experimental.FieldDefaults;

import static info.peigen.hotpot.business.router.facade.enums.RouterAction.*;

/**
 * <b>(RouterDomainServiceTestBase)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2021/7/31
 */
@FieldDefaults(level = AccessLevel.PROTECTED)
public class RouterDomainServiceTestBase extends RouterRepositoryTestBase {
    protected QueryPayeeCurrencyOrder genQueryPayeeCurrencyOrder() {
        return QueryPayeeCurrencyOrder.builder()
                .bizOrderNo(RandomUtil.randomString(20))
                .productCode(Query_All_Currency.code())
                .build();
    }

    protected WithdrawOrder genWithdrawOrder() {
        return WithdrawOrder.builder()
                .bizOrderNo(RandomUtil.randomString(20))
                .productCode(Withdraw.code())
                .tradeId(IdUtil.id())
                .batchNo(IdUtil.id())
                .build();
    }

    protected WithdrawOrder genDeclarationOrder() {
        return WithdrawOrder.builder()
                .bizOrderNo(RandomUtil.randomString(20))
                .productCode(Withdraw.code())
                .tradeId(IdUtil.id())
                .build();
    }

    protected ReceiptOrder genReceiptOrder() {
        return ReceiptOrder.builder()
                .bizOrderNo(RandomUtil.randomString(20))
                .productCode(Receipt.code())
                .build();
    }

    protected CreateVirtualAccountOrder genCreateVirtualAccountOrder() {
        return CreateVirtualAccountOrder.builder()
                .bizOrderNo(RandomUtil.randomString(20))
                .productCode(Create_Virtual_Account.code())
                .build();
    }

    protected ChangeVirtualAccountOrder genChangeVirtualAccountOrder() {
        return ChangeVirtualAccountOrder.builder()
                .bizOrderNo(RandomUtil.randomString(20))
                .productCode(Change_Virtual_Account.code())
                .build();
    }

}